package com.googlecode.lohr.tools.interpreter;

import lohr.lang.dom.CompilationUnit;

public class CompilationUnitImpl extends ClosureImpl {
	
	private CompilationUnit _compilationUnit;
	
	public CompilationUnitImpl(LohrInterpreter lohrInterpreter, CompilationUnit compilationUnit) {
		super(lohrInterpreter, compilationUnit);
		_compilationUnit= compilationUnit;
	}

	final public ObjectImpl invoke(ObjectImpl context) {
		return super.invoke(context, new Locals());
	}

	final public CompilationUnit getCompilationUnit() {
		return _compilationUnit;
	}

	public void invoke() {
		// execute expressions in compilation unit 
		super.invoke(this, new Locals());
	}

}
